<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <title>缴费明细查询</title>
    <link href="<%=basePath%>/css/style.css" rel="stylesheet" type="text/css" />
    <link href="<%=basePath%>/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="<%=basePath%>>/js/jquery.min.js"></script>
    <script type="text/javascript">

        function gotoPage(pn){
            if(null != pn && pn!=''){
                document.form1.action="<%=basePath%>payListController?pn="+pn;
            }
            document.form1.submit();
        }
        $(function(){
            $('tbody tr:odd').addClass("trLight");

            $(".select-all").click(function(){
                if($(this).attr("checked")){
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", true);
                    });
                }else{
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", false);
                    });
                }
            });
        });
    </script>
    <style type="text/css">
        body {
            background:#FFF
        }
    </style>
</head>

<body>
<div id="contentWrap">
    <!--表格控件 -->
    <form action="<%=basePath%>payListController" method="post" name="form1">
    <div id="widget table-widget">
        <div class="pageTitle">缴费明细查询</div>
        <div class="querybody">
            <ul class="seachform">
                <li><label>会员ID</label><input name="" type="text" class="scinput" /></li>
                <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
            </ul>
        </div>
        <div class="pageColumn">
            <div class="pageButton"><span>缴费明细列表</span></div>
            <table>
                <thead>
                <th width="">id</th>
                <th width="">会员ID</th>
                <th width="">会员名称</th>
                <th width="">充值金额</th>
                <th width="">卡余额</th>
                <th width="">充值方式</th>
                <th width="">收款人</th>
                <th width="">充值日期</th>
                </thead>
                <tbody>
                <c:forEach items="${payList}" var="pay" >
                    <tr>
                        <td>${pay.id}</td>
                        <td>${pay.memberid}</td>
                        <td>${pay.name}</td>
                        <td>${pay.money}</td>
                        <td>${pay.balance}</td>
                        <td>
                            <c:if test="${pay.type=='1'}">现金</c:if>
                            <c:if test="${pay.type=='2'}">支付宝</c:if>
                            <c:if test="${pay.type=='3'}">微信</c:if>
                        </td>
                        <td>${pay.member}</td>
                        <td>
                            <fmt:formatDate value="${pay.date}" pattern="yyyy-MM-dd"/>
                        </td>


                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div><!-- #widget -->
    <div id="pagination" style="align:right;margin-top:-10px;">
        <div id='project_pagination' class="pagination pagination-centered">
            <div class="pagination">
                <ul>
                    <li><a href="javascript:void(0);" onclick="gotoPage(1)">首页</a></li>
                    <li><a href="javascript:void(0);" onclick="gotoPage(${pageInfo.pageNum-1})">上一页</a></li>
                    <li><a href="javascript:void(0);" onclick="gotoPage(${pageInfo.pageNum+1})">下一页</a></li>
                    <li><a href="javascript:void(0);" onclick="gotoPage(${pageInfo.pages})">尾页</a></li>
                </ul>
                <ul>
                    <li><span>共&nbsp;&nbsp;${pageInfo.total} 条记录&nbsp;&nbsp;</span></li>
                    <li><span>当前显示第&nbsp;${pageInfo.pageNum }&nbsp;页</span></li>
                </ul>
            </div>
        </div>
    </div>
    </form>
</div>
</body>
</html>

